import Vue from 'vue'
import VueRouter from 'vue-router'
import UI_Router from '../views/UI_Router'
import Contacts from '../views/Contacts'
import About from '../views/About'
import All_contacts from '../views/Child/All_contacts'
import Alice from '../views/Child/Alice'
import Bob from '../views/Child/Bob'
import Blog from '../views/Child/Child_2/Blog'
import Fax from '../views/Child/Child_2/Fax'
Vue.use(VueRouter)

const routes = [
  {
    path: '/uirouter',
    component: UI_Router
  },
  {
    path: '/contacts',
    component: Contacts,
    children: [
      {
        path: 'allcontacts',
        component: All_contacts
      },
      {
        path: 'alice',
        component: Alice
      },
      {
        path: 'bob',
        component: Bob,
        children: [
          {
            path: 'blog',
            component: Blog
          },
          {
            path: 'fax',
            component: Fax
          }
        ]
      }
    ]
  },
  {
    path: '/about',
    component: About
  },
]

const router = new VueRouter({
  routes
})
export default router